Repository navigation
lint: nodiscard results reads only declarations, and asio, beast, cobalt and trystero ask for it; a configured GCC 15 is probed - #22
Merged
Conversation
added 5 commits
November 16, 2026 10:46
… classes, so a local written T name(arguments); in a function's body is no function; it reads an alias of result, a using-declaration of it and a trailing return type too, and not a member's out-of-line definition, which its declaration answers for
A { opens a scope of declarations only after a namespace's, a class's or an extern block's
head, the class's attributes and export macros let through; a function's body, a lambda, an
initializer and an enum do not, nor anything nested in them, and parentheses hide parameters.
Preprocessor lines are left out. Aliases are gathered across the library's headers. A finding
is reported at the function's name. lint_test plants the false positives and the gaps.
…ich takes no attribute (clang refuses one, GCC ignores it) and which the function's first declaration answers for; a hidden friend defined in its class is still read The declaration's words are now read back from the result type itself, so a leading :: after friend no longer hides the friend: cobalt's pipe.hpp declares friend ::boost::system::result<...> pipe(...). lint_test plants a friend declaration, spared, and a hidden friend, reported.
… nodiscard results rule too
… tools/ci/actions/gcc/coroutine_probe.cpp before anything builds, once per compiler and run of b2, and one that fails it, as GCC 15.2 does (GCC PR121643), stops the build naming the compiler and GCC 15.3
…sults branches, which ask for the nodiscard results rule Each library's meta/lint.json asks for the rule, and every function of its include/ that returns boost::system::result is [[nodiscard]]: asio's make_tls_client_context, beast's set_server_name, cobalt's shipped Wasm backend and native SSL wrapper (declared so by upstream/sync.py), trystero's app::join. asio's branch stacks on fix/diagnostic-directives, trystero's on crypto/secp256k1, beast's and cobalt's on their main.
pinhopro
force-pushed
the
nodiscard/v0.1
branch
from
November 16, 2026 14:08
f93f529 to
8c7b886
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three pieces of work that follow webcpp::crypto 0.1 and webcpp::hash increment 1, kept out of
their pull requests so those stay within their scope:
nodiscard resultsrule reads only declarations. It read anysystem::result<...> name(as a function declaration, at any depth, so a local written withparentheses in a function's body was reported (hash brace-initialises three such locals only to
dodge it). The rule is now scope-aware: it reads the declarations of namespaces and classes,
aliases of
result(also a using-declaration of it) and trailing return types, and skips amember's out-of-line definition and a friend declaration without a body, which its first
declaration answers for.
this branch records: asio's
make_tls_client_context, beast'sset_server_name, cobalt'sshipped Wasm backend and native SSL wrapper (declared so by its generator), trystero's
app::join. CODING-GUIDELINES.md lists the libraries that ask for it.tools/ci/actions/gcc/coroutine_probe.cpp, the CI's GCC 15 probe, with the GCC 15 auser-config.jam configures, once per compiler and run of b2; one that fails it, as GCC 15.2
does (GCC PR121643, an internal compiler error on Cobalt's
race), stops the build before itcompiles anything, naming the compiler and GCC 15.3.
This branch is stacked on hash/v0.1 (webcpp::hash increment 1), which is stacked on crypto/v0.1:
its base is hash/v0.1 until that merges, then
main. Merge order: #19, crypto/v0.1, hash/v0.1,this one; then #17 rebases onto them. After this one merges, the four libraries' pull requests
are re-run against the new
mainand merged, so thatmainrecords commits of theirmain.What changes
planted cases (ten findings, every spared form).
cobalt chapter's PR121643 paragraph says what the local probe does.
gcc-probe, before the Boost check), tools/test/jamroot_test.py (a GCC 15 that failsthe probe is refused, another GCC is not probed, a working one passes), AGENTS.md's
prerequisites, doc/releases/0.1.0.adoc "Tools and build".
requests (asio's on fix/diagnostic-directives, trystero's on crypto/secp256k1, beast's and
cobalt's on their
main).Verification
Local, on this branch's tip, which holds crypto 0.1 and hash increment 1 too:
From scratch (
b2 -a -j8, fresh build directories), the tests and examples of crypto, hash,asio, beast, cobalt and trystero, 0 failed on every lane:
c-suitesof crypto and hash: 107 passed on native, wasip2, wasip3 and Emscripten;b2 -a doc: every library's doc-check and rendered check;lint: clean(2267 compile commands); all 61tools/**/*_test.pypass;Wine artifact,
summarize.sh: "green but for the known Wine failures"; 14.5 is left to theWindows CI, since both versions gave identical results on every earlier local run.
Known limits
toolset.set-target-variables-aux, anundocumented rule; a b2 that renames it shows as a Jamroot error on gcc.
written
result<int> v(expr);is still read as a function (none exists).🤖 Generated with Claude Code